import request from '@/utils/request'
export default{
    //5、更新数据字典
    update(dict){
        return request({
            url:`/admin/core/dict`,
            method:'PUT',
            data: dict
        })
    },
    //4、查询数据字典
    getById(id){
        return request({
            url:`/admin/core/dict/${id}`,
            method:'GET'
        })
    },
    //3、删除数据字典
    delete(id){
        return request({
            url:`/admin/core/dict/${id}`,
            method:'DELETE'
        })
    },
    //2、新增数据字典
    save(dict){
        return request({
            url:`/admin/core/dict`,
            method:'POST',
            data: dict
        })
    },
    //1、根据pid查询下一级数据字典
    listByPid(pid){
        return request({
            url:`/admin/core/dict/listByPid/${pid}`,
            method:'GET'
        })
    }
}